﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace cludg.Infrastructure.Mailer
{
    public static class MailerHelper
    {
        public static void Send(this IMailer mailer,
            string smtpAddr,
            string from,
            string to,
            string subj,
            string body)
        {
            mailer.Send(smtpAddr, from, new List<string>() { to }, null, subj, body);
        }

        public static void Send(this IMailer mailer,
            string smtpAddr,
            string from,
            IEnumerable<string> to,
            string subj,
            string body)
        {
            mailer.Send(smtpAddr, from, to, null, subj, body);
        }
    }
}
